//
//  XuanZeKeShiDefultView.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/6/3.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "XuanZeKeShiDefultView.h"

@implementation XuanZeKeShiDefultView

- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        [self initSubView];
    }
    return self;
}
- (void)initSubView{
    self.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.leftTitleLabel];
    [self addSubview:self.rightDetailTF];
    
    [_leftTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_centerX).offset(-70);
        make.width.equalTo(@80);
        make.height.equalTo(@40);
        make.centerY.equalTo(self.mas_centerY);
    }];
    [_rightDetailTF mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self->_leftTitleLabel.mas_right);
        make.width.equalTo(@320);
        make.height.equalTo(@40);
        make.centerY.equalTo(self.mas_centerY);
    }];
}
- (UILabel *)leftTitleLabel{
    if (!_leftTitleLabel) {
        UILabel *label = [[UILabel alloc]init];
        label.text = @"测试标题:";
        label.textColor = TITLECOLOR;
        label.font = [UIFont systemFontOfSize:14];
        _leftTitleLabel = label;
    }
    return _leftTitleLabel;
}
- (UITextField *)rightDetailTF{
    if (!_rightDetailTF) {
        UITextField *label = [[UITextField alloc]init];
        label.text = @"";
        label.textColor = TITLECOLOR;
        label.font = [UIFont systemFontOfSize:14];
        _rightDetailTF = label;
    }
    return _rightDetailTF;
}


// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
    UIBezierPath *path = [[UIBezierPath alloc]init];
    [path moveToPoint:CGPointMake(90, 40)];
    [path addLineToPoint:CGPointMake(self.frame.size.width, 40)];
    path.lineWidth = 1;
    [LINCOLOR set];
    [path stroke];
}


@end
